using System;
using System.Collections.Generic;
using System.Text;

using System.Reflection;

namespace BLL
{
    public class BLLFactory
    {
        private static readonly string AssemblyName = "BLL";

        public static IAdminManager CreateAdminManager()
        {
            string className = AssemblyName + ".Impl.AdminManagerImpl";
            return (IAdminManager)Assembly.Load(AssemblyName).CreateInstance(className);
        }
        
        public static ICapacityManager CreateCapacityManager()
        {
            string className = AssemblyName + ".Impl.CapacityManagerImpl";
            return (ICapacityManager)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static ICargoCarsManager CreateCargoCarsManager()
        {
            string className = AssemblyName + ".Impl.CargoCarsManagerImpl";
            return (ICargoCarsManager)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static ICarriersManager CreateCarriersManager()
        {
            string className = AssemblyName + ".Impl.CarriersManagerImpl";
            return (ICarriersManager)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static ICostManager CreateCostManager()
        {
            string className = AssemblyName + ".Impl.CostManagerImpl";
            return (ICostManager)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static ICustomManager CreateCustomManager()
        {
            string className = AssemblyName + ".Impl.CustomManagerImpl";
            return (ICustomManager)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static IDriverManger CreateDriverManger()
        {
            string className = AssemblyName + ".Impl.DriverMangerImpl";
            return (IDriverManger)Assembly.Load(AssemblyName).CreateInstance(className);
        }

        public static IVehicleManager CreateVehicleManager()
        {
            string className = AssemblyName + ".Impl.VehicleManagerImpl";
            return (IVehicleManager)Assembly.Load(AssemblyName).CreateInstance(className);
        }
    }
}
